<script type="text/javascript" src="/static/tinymce/tinymce.min.js"></script>


<div class="contact-info">
    <div class="contact-info-grids" style="height:550px;">
        <div class="col-md-3 col-sm-3"></div>
        <form action="{:url('index/article/save')}" method="post" class="col-md-6 col-sm-6" style="margin:0 auto;">
            <div class="input-group input-group-lg ">
                <span class="input-group-addon" id="sizing-addon1">Title:</span>
                <input type="text" name="title" class="form-control" placeholder="" aria-describedby="sizing-addon1">
            </div>
            <div id="editor" style="width:100%;height:300px;margin:0 auto;">
                <textarea>Next, use our Get Started docs to setup Tiny!</textarea>
            </div>
            <div class="input-group input-group-lg">
                <button type="button" class="label label-primary">提交</button>
            </div>
        </form>
    </div>
</div>
<script>
    tinymce.init({
        selector:'textarea',
    });
</script>

<script type="text/javascript">
    // var ue = UE.getEditor('editor');
    var post_url = '{:Url("index/article/save")}';
/*
    $(function(){
        $('button').click(function(){
            var content = UE.getEditor('editor').getContent();
            var title = $('input[name="title"]').val();

            $.post(post_url,{
                'title':title,'content':content
            },function(status){alert(status);});
        })
    })*/
</script>